package cn.zyl.demo.common.enums;

/**
 * HexEnum枚举说明: 进制枚举(0标识通用为数字零)
 *
 * @author wsz
 * @version v1.0
 * @date 2020-07-22
 */
public enum HexEnum {
    /** 二进制*：01,阴阳*/
    HEX_2(2,new char[]{'0','1'}),
    /** 3进制：012，上中下，太微、紫微、天市*/
    HEX_3(3,new char[]{'0','1','2'}),
    /** 平衡(对称)3进制：-1 0 1，T01*/
    HEX_3_BAL(-3,new char[]{'T','0','1'}),
    /** 4进制：0123，左右前后，东西南北，春夏秋冬，青龙白虎朱雀玄武，木金火水*/
    HEX_4(4,new char[]{'0','1','2','3'}),
    /** 5进制：01234,金木水火土*/
    HEX_5(5,new char[]{'0','1','2','3','4'}),
    /** 平衡(对称)5进制：-2 -1 0 1 2,ST012*/
    HEX_5_BAL(-5,new char[]{'S','T','0','1','2'}),
    /** 6进制：012345*/
    HEX_6(6,new char[]{'0','1','2','3','4','5'}),
    /** 7进制：0123456*/
    HEX_7(7,new char[]{'0','1','2','3','4','5','6'}),
    /** 8进制*：01234567，乾（☰）、坎（☵）、艮（☶）、震（☳）、巽（☴）、离（☲）、坤（☷）、兑（☱）*/
    HEX_8(8,new char[]{'0','1','2','3','4','5','6','7'}),
    /** 9进制：012345678*/
    HEX_9(9,new char[]{'0','1','2','3','4','5','6','7','8'}),
    /** 10进制*：0123456789*/
    HEX_10(10,new char[]{'0','1','2','3','4','5','6','7','8','9'}),
    /** 11进制：0123456789A,0123456789X*/
    HEX_11(11,new char[]{'0','1','2','3','4','5','6','7','8','9','A'}),
    /** 12进制：0123456789AB,0123456789XE*/
    HEX_12(12,new char[]{'0','1','2','3','4','5','6','7','8','9','A','B'}),
    /** 16进制*：0123456789 A B C D E F*/
    HEX_16(16,new char[]{'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'}),
    /** 26进制：o-z*/
    HEX_26(26,new char[]{'a','b','c','d','e','f','g','h','i','j' ,'k','l','m','n','o','p','q','r','s','t' ,'u','v','w','x','y','z'}),
    /** 32进制*/
    HEX_32(32,new char[]{'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'}),
    /** 36进制*/
    HEX_36(36,new char[]{'0','1','2','3','4','5','6','7','8','9'
            ,'a','b','c','d','e','f','g','h','i','j' ,'k','l','m','n','o','p','q','r','s','t' ,'u','v','w','x','y','z'}),
    /** 52进制*/
    HEX_52(52,new char[]{'a','b','c','d','e','f','g','h','i','j' ,'k','l','m','n','o','p','q','r','s','t' ,'u','v','w','x','y','z'
            ,'A','B','C','D','E','F','G','H','I','J' ,'K','L','M','N','O','P','Q','R','S','T' ,'U','V','W','X','Y','Z'}),
    /** 62进制*/
    HEX_62(62,new char[]{'0','1','2','3','4','5','6','7','8','9'
            ,'a','b','c','d','e','f','g','h','i','j' ,'k','l','m','n','o','p','q','r','s','t' ,'u','v','w','x','y','z'
            ,'A','B','C','D','E','F','G','H','I','J' ,'K','L','M','N','O','P','Q','R','S','T' ,'U','V','W','X','Y','Z'}),
    /** 64进制
     * <pre>
     *     64进制，所用的字符是: 0123456789 abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ +/
     *     (MIME格式)base64，所用的字符是: ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789 +/
     *     (IRCu等软件)base64，字符区别: +/ 替代为 []
     *     (URL的改进版)base64，字符区别: +/ 替代为 -_
     *     (正则的改进版)base64，字符区别: +/ 替代为 !-
     *     (xml)base64，字符区别: +/ 替代为 _:
     *     (其他变种)base64，字符区别: +/ 替代为 _- 或 ._ 或 .- 等
     * </pre>
     * */
    HEX_64(64,new char[]{'0','1','2','3','4','5','6','7','8','9'
            ,'a','b','c','d','e','f','g','h','i','j' ,'k','l','m','n','o','p','q','r','s','t' ,'u','v','w','x','y','z'
            ,'A','B','C','D','E','F','G','H','I','J' ,'K','L','M','N','O','P','Q','R','S','T' ,'U','V','W','X','Y','Z'
            ,'+','/'}),
    ;
    private final int hex;
    private final char[] digits;
    HexEnum(int hex,char[] digits){ this.hex = hex;this.digits=digits; }
    public int getHex() { return hex; }
    public char[] getDigits() { return digits; }
}
